export interface ResponseData {
  code: number
  message: string
  ok: boolean
}

export interface Permission {
  id?: number
  createTime?: string
  updateTime?: string
  pid: number
  name: string
  code: string
  toCode: string
  type: number
  status: number
  level: number
  children?: PermissionList
  select: boolean
}

export type PermissionList = Permission[]

/**
 * 权限接口返回的数据类型
 */
export interface PermissionResponseData extends ResponseData {
  data: PermissionList
}

/**
 * 添加与修改菜单携带的数据
 */
export interface MenuParams {
  id?: number // id
  code: string // 权限
  level: number // 菜单等级
  name: string // 菜单名字
  pid: number // id
}
